package com.ntt.benew.dictionary.entity.gpt

import android.os.Parcel
import android.os.Parcelable
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName

@Keep
data class SentenceStructureEntity(
    val subject: String? = null,
    val verb: String? = null,
    @field:SerializedName("object")
    val obj: String? = null,
    val complement: String? = null,
    val adverbial: String? = null
) : Parcelable {
    constructor(parcel: Parcel) : this(
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString(),
        parcel.readString()
    ) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(subject)
        parcel.writeString(verb)
        parcel.writeString(obj)
        parcel.writeString(complement)
        parcel.writeString(adverbial)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<SentenceStructureEntity> {
        override fun createFromParcel(parcel: Parcel): SentenceStructureEntity {
            return SentenceStructureEntity(parcel)
        }

        override fun newArray(size: Int): Array<SentenceStructureEntity?> {
            return arrayOfNulls(size)
        }
    }
}